home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / local / bin / tails-activate-winxp-theme < prev    next >
Encoding:
Text File  |  2012-11-27  |  16.0 KB  |  259 lines

  1. #!/bin/sh
  2.  
  3. # This script sets up the live user's Gnome theme to something that
  4. # resembles Microsoft Windows XP.
  5.  
  6. . /etc/live/config.d/username.conf
  7.  
  8. # Set IE icon in iceweasel
  9. ie_icon="/usr/share/icons/GnomeXP/48x48/apps/iceweasel.png"
  10. for x in /usr/share/iceweasel/chrome/icons/default/*; do
  11.     rm ${x}
  12.     ln -s ${ie_icon} ${x}
  13. done
  14.  
  15. # Remove Tails-specific desktop icons
  16. rm --interactive=never -f /home/${LIVE_USERNAME}/Desktop/*.desktop \
  17.     /etc/skel/Desktop/*.desktop 2> /dev/null || true
  18.  
  19. # The part below is based on the XpGnome installation script, written
  20. # by PhrankDaChicken, available from http://ubunut.online02.com/xpgnome
  21.  
  22. gconf_set() {
  23.     sudo -H -u "${LIVE_USERNAME}" gconftool-2 --set "$@"
  24. }
  25.  
  26. # Icon theme
  27. gconf_set "/desktop/gnome/interface/icon_theme" --type string "GnomeXP"
  28.  
  29. # Cursor theme
  30. gconf_set "/desktop/gnome/peripherals/mouse/cursor_theme" --type string "xp-cursor"
  31.  
  32. # GTK theme
  33. gconf_set "/desktop/gnome/interface/gtk_theme" --type string "XPLuna"
  34.  
  35. # Metacity theme
  36. gconf_set "/apps/metacity/general/theme" --type string "XPLuna"
  37.  
  38. # Toolbars - Icons Only
  39. gconf_set "/desktop/gnome/interface/toolbar_style" --type string "icons"
  40. # Nautilus Sidebar
  41. gconf_set "/apps/nautilus/preferences/side_pane_view" --type string "NautilusTreeSidebar"
  42. gconf_set "/apps/nautilus/sidebar_panels/tree/show_only_directories" --type bool TRUE
  43.  
  44. # FIXME: Localization needed below
  45. # Desktop Icons
  46. gconf_set "/apps/nautilus/desktop/computer_icon_visible" --type bool TRUE
  47. gconf_set "/apps/nautilus/desktop/computer_icon_name" --type string "My Computer"
  48. gconf_set "/apps/nautilus/desktop/home_icon_visible" --type bool TRUE
  49. gconf_set "/apps/nautilus/desktop/home_icon_name" --type string "My Documents"
  50. gconf_set "/apps/nautilus/desktop/network_icon_visible" --type bool TRUE
  51. gconf_set "/apps/nautilus/desktop/network_icon_name" --type string "My Network Places"
  52. gconf_set "/apps/nautilus/desktop/trash_icon_visible" --type bool TRUE
  53. gconf_set "/apps/nautilus/desktop/trash_icon_name" --type string "Recycle Bin"
  54. gconf_set "/apps/nautilus/desktop/volumes_visible" --type bool FALSE
  55.  
  56. # Background
  57. gconf_set "/desktop/gnome/background/picture_filename" --type string "/usr/share/pixmaps/backgrounds/xp-bliss.jpg"
  58. gconf_set "/desktop/gnome/background/picture_options" --type string "stretched"
  59.  
  60. # Make sure there are four workspaces
  61. gconf_set "/apps/metacity/general/num_workspaces" --type int 4
  62.  
  63. ## Panel Stuff
  64. # Create New Panel
  65. gconf_set "/apps/panel/toplevels/xp_bottom_panel/animation_speed" --type string "medium"
  66. gconf_set "/apps/panel/toplevels/xp_bottom_panel/auto_hide" --type bool FALSE
  67. gconf_set "/apps/panel/toplevels/xp_bottom_panel/auto_hide_size" --type int 6
  68. gconf_set "/apps/panel/toplevels/xp_bottom_panel/enable_animations" --type bool TRUE
  69. gconf_set "/apps/panel/toplevels/xp_bottom_panel/enable_arrows" --type bool TRUE
  70. gconf_set "/apps/panel/toplevels/xp_bottom_panel/enable_buttons" --type bool FALSE
  71. gconf_set "/apps/panel/toplevels/xp_bottom_panel/expand" --type bool TRUE
  72. gconf_set "/apps/panel/toplevels/xp_bottom_panel/hide_delay" --type int 500
  73. gconf_set "/apps/panel/toplevels/xp_bottom_panel/monitor" --type int 0
  74. gconf_set "/apps/panel/toplevels/xp_bottom_panel/name" --type string "xp_bottom_panel"
  75. gconf_set "/apps/panel/toplevels/xp_bottom_panel/orientation" --type string "bottom"
  76. gconf_set "/apps/panel/toplevels/xp_bottom_panel/screen" --type int 0
  77. gconf_set "/apps/panel/toplevels/xp_bottom_panel/size" --type int 32
  78. gconf_set "/apps/panel/toplevels/xp_bottom_panel/unhide_delay" --type int 500
  79. gconf_set "/apps/panel/toplevels/xp_bottom_panel/x" --type int 0
  80. gconf_set "/apps/panel/toplevels/xp_bottom_panel/x_centered" --type bool FALSE
  81. gconf_set "/apps/panel/toplevels/xp_bottom_panel/x_right" --type int 0
  82. gconf_set "/apps/panel/toplevels/xp_bottom_panel/y" --type int 0
  83. gconf_set "/apps/panel/toplevels/xp_bottom_panel/y_bottom" --type  int 0
  84. gconf_set "/apps/panel/toplevels/xp_bottom_panel/y_centered" --type bool FALSE
  85.  
  86. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/color" --type string "#ffffff"
  87. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/fit" --type bool FALSE
  88. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/image" --type string ""
  89. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/opacity" --type int 6000
  90. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/rotate" --type bool FALSE
  91. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/stretch" --type bool FALSE
  92. gconf_set "/apps/panel/toplevels/xp_bottom_panel/background/type" --type string "gtk"
  93.  
  94. # Start Menu
  95. gconf_set "/apps/panel/objects/xp_start_menu/action_type" --type string "lock"
  96. gconf_set "/apps/panel/objects/xp_start_menu/attached_toplevel_id" --type string ""
  97. gconf_set "/apps/panel/objects/xp_start_menu/bonobo_iid" --type string ""
  98. gconf_set "/apps/panel/objects/xp_start_menu/custom_icon" --type string "/usr/share/themes/XPLuna/start.png"
  99. gconf_set "/apps/panel/objects/xp_start_menu/launcher_location" --type string ""
  100. gconf_set "/apps/panel/objects/xp_start_menu/locked" --type bool TRUE
  101. gconf_set "/apps/panel/objects/xp_start_menu/menu_path" --type string "applications:/"
  102. gconf_set "/apps/panel/objects/xp_start_menu/object_type" --type string "menu-object"
  103. gconf_set "/apps/panel/objects/xp_start_menu/panel_right_stick" --type bool FALSE
  104. gconf_set "/apps/panel/objects/xp_start_menu/position" --type int 0
  105. gconf_set "/apps/panel/objects/xp_start_menu/tooltip" --type string "Main Menu"
  106. gconf_set "/apps/panel/objects/xp_start_menu/toplevel_id" --type string "xp_bottom_panel"
  107. gconf_set "/apps/panel/objects/xp_start_menu/use_custom_icon" --type bool TRUE
  108. gconf_set "/apps/panel/objects/xp_start_menu/use_menu_path" --type bool FALSE
  109.  
  110. # Launchers
  111.  
  112. # Make .desktop:s with small icons used for launchers
  113. launcher_dir="/home/${LIVE_USERNAME}/.gnome2/panel2.d/default/launchers/"
  114. mkdir -p ${launcher_dir}
  115. sed 's/\(^Icon[^=]*=\).*$/\1ie_launcher/' /usr/share/applications/iceweasel.desktop > ${launcher_dir}/iceweasel.desktop
  116. sed 's/\(^Icon[^=]*=\).*$/\1outlook_launcher/' /usr/share/applications/claws-mail.desktop > ${launcher_dir}/claws-mail.desktop
  117. sed 's/\(^Icon[^=]*=\).*$/\1msn_launcher/' /usr/share/applications/pidgin.desktop > ${launcher_dir}/pidgin.desktop
  118. chown -R ${LIVE_USERNAME}:${LIVE_USERNAME} "/home/${LIVE_USERNAME}/.gnome2"
  119.  
  120. # Browser launcher
  121. gconf_set "/apps/panel/objects/browser_launcher/action_type" --type string "lock"
  122. gconf_set "/apps/panel/objects/browser_launcher/attached_toplevel_id" --type string ""
  123. gconf_set "/apps/panel/objects/browser_launcher/bonobo_iid" --type string ""
  124. gconf_set "/apps/panel/objects/browser_launcher/custom_icon" --type string ""
  125. gconf_set "/apps/panel/objects/browser_launcher/launcher_location" --type string "iceweasel.desktop"
  126. gconf_set "/apps/panel/objects/browser_launcher/locked" --type bool TRUE
  127. gconf_set "/apps/panel/objects/browser_launcher/menu_path" --type string "applications:/"
  128. gconf_set "/apps/panel/objects/browser_launcher/object_type" --type string "launcher-object"
  129. gconf_set "/apps/panel/objects/browser_launcher/panel_right_stick" --type bool FALSE
  130. gconf_set "/apps/panel/objects/browser_launcher/position" --type int 1
  131. gconf_set "/apps/panel/objects/browser_launcher/tooltip" --type string ""
  132. gconf_set "/apps/panel/objects/browser_launcher/toplevel_id" --type string "xp_bottom_panel"
  133. gconf_set "/apps/panel/objects/browser_launcher/use_custom_icon" --type bool TRUE
  134. gconf_set "/apps/panel/objects/browser_launcher/use_menu_path" --type bool FALSE
  135.  
  136. # Email launcher
  137. gconf_set "/apps/panel/objects/email_launcher/action_type" --type string "lock"
  138. gconf_set "/apps/panel/objects/email_launcher/attached_toplevel_id" --type string ""
  139. gconf_set "/apps/panel/objects/email_launcher/bonobo_iid" --type string ""
  140. gconf_set "/apps/panel/objects/email_launcher/custom_icon" --type string ""
  141. gconf_set "/apps/panel/objects/email_launcher/launcher_location" --type string "claws-mail.desktop"
  142. gconf_set "/apps/panel/objects/email_launcher/locked" --type bool TRUE
  143. gconf_set "/apps/panel/objects/email_launcher/menu_path" --type string "applications:/"
  144. gconf_set "/apps/panel/objects/email_launcher/object_type" --type string "launcher-object"
  145. gconf_set "/apps/panel/objects/email_launcher/panel_right_stick" --type bool FALSE
  146. gconf_set "/apps/panel/objects/email_launcher/position" --type int 2
  147. gconf_set "/apps/panel/objects/email_launcher/tooltip" --type string ""
  148. gconf_set "/apps/panel/objects/email_launcher/toplevel_id" --type string "xp_bottom_panel"
  149. gconf_set "/apps/panel/objects/email_launcher/use_custom_icon" --type bool FALSE
  150. gconf_set "/apps/panel/objects/email_launcher/use_menu_path" --type bool FALSE
  151.  
  152. # IM launcher
  153. gconf_set "/apps/panel/objects/im_launcher/action_type" --type string "lock"
  154. gconf_set "/apps/panel/objects/im_launcher/attached_toplevel_id" --type string ""
  155. gconf_set "/apps/panel/objects/im_launcher/bonobo_iid" --type string ""
  156. gconf_set "/apps/panel/objects/im_launcher/custom_icon" --type string ""
  157. gconf_set "/apps/panel/objects/im_launcher/launcher_location" --type string "pidgin.desktop"
  158. gconf_set "/apps/panel/objects/im_launcher/locked" --type bool TRUE
  159. gconf_set "/apps/panel/objects/im_launcher/menu_path" --type string "applications:/"
  160. gconf_set "/apps/panel/objects/im_launcher/object_type" --type string "launcher-object"
  161. gconf_set "/apps/panel/objects/im_launcher/panel_right_stick" --type bool FALSE
  162. gconf_set "/apps/panel/objects/im_launcher/position" --type int 3
  163. gconf_set "/apps/panel/objects/im_launcher/tooltip" --type string ""
  164. gconf_set "/apps/panel/objects/im_launcher/toplevel_id" --type string "xp_bottom_panel"
  165. gconf_set "/apps/panel/objects/im_launcher/use_custom_icon" --type bool FALSE
  166. gconf_set "/apps/panel/objects/im_launcher/use_menu_path" --type bool FALSE
  167.  
  168. # Window Switcher
  169. gconf_set "/apps/panel/applets/xp_taskbar/action_type" --type string "lock"
  170. gconf_set "/apps/panel/applets/xp_taskbar/attached_toplevel_id" --type string ""
  171. gconf_set "/apps/panel/applets/xp_taskbar/bonobo_iid" --type string "OAFIID:GNOME_WindowListApplet"
  172. gconf_set "/apps/panel/applets/xp_taskbar/custom_icon" --type string ""
  173. gconf_set "/apps/panel/applets/xp_taskbar/launcher_location" --type string ""
  174. gconf_set "/apps/panel/applets/xp_taskbar/locked" --type bool TRUE
  175. gconf_set "/apps/panel/applets/xp_taskbar/menu_path" --type string "applications:/"
  176. gconf_set "/apps/panel/applets/xp_taskbar/object_type" --type string "bonobo-applet"
  177. gconf_set "/apps/panel/applets/xp_taskbar/panel_right_stick" --type bool FALSE
  178. gconf_set "/apps/panel/applets/xp_taskbar/position" --type int 4
  179. gconf_set "/apps/panel/applets/xp_taskbar/tooltip" --type string ""
  180. gconf_set "/apps/panel/applets/xp_taskbar/toplevel_id" --type string "xp_bottom_panel"
  181. gconf_set "/apps/panel/applets/xp_taskbar/use_custom_icon" --type bool FALSE
  182. gconf_set "/apps/panel/applets/xp_taskbar/use_menu_path" --type bool FALSE
  183. gconf_set "/apps/panel/applets/xp_taskbar/prefs/display_all_workspaces" --type bool FALSE
  184. gconf_set "/apps/panel/applets/xp_taskbar/prefs/group_windows" --type string "never"
  185. gconf_set "/apps/panel/applets/xp_taskbar/prefs/maximum_size" --type int 4096
  186. gconf_set "/apps/panel/applets/xp_taskbar/prefs/minimum_size" --type int 50
  187. gconf_set "/apps/panel/applets/xp_taskbar/prefs/move_unminimized_windows" --type bool TRUE
  188.  
  189. # Notification Area
  190. gconf_set "/apps/panel/applets/xp_systray/action_type" --type string "lock"
  191. gconf_set "/apps/panel/applets/xp_systray/attached_toplevel_id" --type string ""
  192. gconf_set "/apps/panel/applets/xp_systray/bonobo_iid" --type string "OAFIID:GNOME_NotificationAreaApplet"
  193. gconf_set "/apps/panel/applets/xp_systray/custom_icon" --type string ""
  194. gconf_set "/apps/panel/applets/xp_systray/launcher_location" --type string ""
  195. gconf_set "/apps/panel/applets/xp_systray/locked" --type bool TRUE
  196. gconf_set "/apps/panel/applets/xp_systray/menu_path" --type string "applications:/"
  197. gconf_set "/apps/panel/applets/xp_systray/object_type" --type string "bonobo-applet"
  198. gconf_set "/apps/panel/applets/xp_systray/panel_right_stick" --type bool TRUE
  199. gconf_set "/apps/panel/applets/xp_systray/position" --type int 3
  200. gconf_set "/apps/panel/applets/xp_systray/tooltip" --type string ""
  201. gconf_set "/apps/panel/applets/xp_systray/toplevel_id" --type string "xp_bottom_panel"
  202. gconf_set "/apps/panel/applets/xp_systray/use_custom_icon" --type bool FALSE
  203. gconf_set "/apps/panel/applets/xp_systray/use_menu_path" --type bool FALSE
  204.  
  205. # Volume Control
  206. gconf_set "/apps/panel/applets/xp_volume/action_type" --type string "lock"
  207. gconf_set "/apps/panel/applets/xp_volume/attached_toplevel_id" --type string ""
  208. gconf_set "/apps/panel/applets/xp_volume/bonobo_iid" --type string "OAFIID:GNOME_MixerApplet"
  209. gconf_set "/apps/panel/applets/xp_volume/custom_icon" --type string ""
  210. gconf_set "/apps/panel/applets/xp_volume/launcher_location" --type string ""
  211. gconf_set "/apps/panel/applets/xp_volume/locked" --type bool TRUE
  212. gconf_set "/apps/panel/applets/xp_volume/menu_path" --type string "applications:/"
  213. gconf_set "/apps/panel/applets/xp_volume/object_type" --type string "bonobo-applet"
  214. gconf_set "/apps/panel/applets/xp_volume/panel_right_stick" --type bool TRUE
  215. gconf_set "/apps/panel/applets/xp_volume/position" --type int 2
  216. gconf_set "/apps/panel/applets/xp_volume/tooltip" --type string ""
  217. gconf_set "/apps/panel/applets/xp_volume/toplevel_id" --type string "xp_bottom_panel"
  218. gconf_set "/apps/panel/applets/xp_volume/use_custom_icon" --type bool FALSE
  219. gconf_set "/apps/panel/applets/xp_volume/use_menu_path" --type bool FALSE
  220.  
  221. # Clock
  222. gconf_set "/apps/panel/applets/xp_clock/action_type" --type string "lock"
  223. gconf_set "/apps/panel/applets/xp_clock/attached_toplevel_id" --type string ""
  224. gconf_set "/apps/panel/applets/xp_clock/bonobo_iid" --type string "OAFIID:GNOME_ClockApplet"
  225. gconf_set "/apps/panel/applets/xp_clock/custom_icon" --type string ""
  226. gconf_set "/apps/panel/applets/xp_clock/launcher_location" --type string ""
  227. gconf_set "/apps/panel/applets/xp_clock/locked" --type bool TRUE
  228. gconf_set "/apps/panel/applets/xp_clock/menu_path" --type string "applications:/"
  229. gconf_set "/apps/panel/applets/xp_clock/object_type" --type string "bonobo-applet"
  230. gconf_set "/apps/panel/applets/xp_clock/panel_right_stick" --type bool TRUE
  231. gconf_set "/apps/panel/applets/xp_clock/position" --type int 0
  232. gconf_set "/apps/panel/applets/xp_clock/tooltip" --type string ""
  233. gconf_set "/apps/panel/applets/xp_clock/toplevel_id" --type string "xp_bottom_panel"
  234. gconf_set "/apps/panel/applets/xp_clock/use_custom_icon" --type bool FALSE
  235. gconf_set "/apps/panel/applets/xp_clock/use_menu_path" --type bool FALSE
  236.  
  237. gconf_set "/apps/panel/applets/xp_clock/prefs/config_tool" --type string ""
  238. gconf_set "/apps/panel/applets/xp_clock/prefs/custom_format" --type string ""
  239. gconf_set "/apps/panel/applets/xp_clock/prefs/expand_appointments" --type bool TRUE
  240. gconf_set "/apps/panel/applets/xp_clock/prefs/expand_birthdays" --type bool TRUE
  241. gconf_set "/apps/panel/applets/xp_clock/prefs/expand_tasks" --type bool FALSE
  242. gconf_set "/apps/panel/applets/xp_clock/prefs/expand_weather" --type bool FALSE
  243. gconf_set "/apps/panel/applets/xp_clock/prefs/format" --type string "12-hour"
  244. gconf_set "/apps/panel/applets/xp_clock/prefs/gmt_time" --type bool FALSE
  245. gconf_set "/apps/panel/applets/xp_clock/prefs/hour_format" --type string "12"
  246. gconf_set "/apps/panel/applets/xp_clock/prefs/internet_time" --type bool FALSE
  247. gconf_set "/apps/panel/applets/xp_clock/prefs/show_date" --type bool FALSE
  248. gconf_set "/apps/panel/applets/xp_clock/prefs/show_seconds" --type bool FALSE
  249. gconf_set "/apps/panel/applets/xp_clock/prefs/show_timezones" --type bool FALSE
  250. gconf_set "/apps/panel/applets/xp_clock/prefs/show_tooltip" --type bool TRUE
  251. gconf_set "/apps/panel/applets/xp_clock/prefs/show_week_numbers" --type bool TRUE
  252. gconf_set "/apps/panel/applets/xp_clock/prefs/unix_time" --type bool FALSE
  253. gconf_set "/apps/panel/applets/xp_clock/prefs/timezones/tz_id_list" --type list --list-type string "[]"
  254.  
  255. # Add Panels Items
  256. gconf_set "/apps/panel/general/applet_id_list" --type list --list-type string "[xp_taskbar,xp_systray,xp_volume,xp_clock]"
  257. gconf_set "/apps/panel/general/object_id_list" --type list --list-type string "[xp_start_menu,browser_launcher,email_launcher,im_launcher]"
  258. gconf_set "/apps/panel/general/toplevel_id_list" --type list --list-type string "[xp_bottom_panel]"
  259.